package itheima.d07;

import java.util.Arrays;
import java.util.Comparator;

public class Test {
    public static void main(String[] args) {
        String[]names={"张三","李四","王五"};
//        Arrays.sort(names);
        Arrays.sort(names, new Comparator<String>() {
            @Override
            public int compare(String o1, String o2) {
                return  o1.compareToIgnoreCase(o2);
            }

        });
        Arrays.sort(names, String::compareToIgnoreCase);
    }
}
